/* app_matrix_data.c */
#include "app_matrix_data.h"

/*******************************************************************************
 * Variables
 ******************************************************************************/

/* 用于矩阵加法, 减法, 乘法(星乘), 乘法(叉乘), 缩放, 向量点乘等计算. */
float32_t matrix_input_M1_data_f32[MATRIX_INPUT_M1_ROWS*MATRIX_INPUT_M1_COLS] =
{
    0.00, 0.01, 0.02, 0.03,
    0.04, 0.05, 0.06, 0.07,
    0.08, 0.09, 0.10, 0.11,
    0.12, 0.13, 0.14, 0.15,
    0.16, 0.17, 0.18, 0.19
};

arm_matrix_instance_f32 arm_matrix_input_M1_f32 =
{
    .numRows = MATRIX_INPUT_M1_ROWS,
    .numCols = MATRIX_INPUT_M1_COLS,
    .pData   = (float32_t *)matrix_input_M1_data_f32
};

/* 用于矩阵加法, 减法, 乘法(星乘), 向量点乘等计算. */
float32_t matrix_input_M2_data_f32[MATRIX_INPUT_M1_ROWS*MATRIX_INPUT_M1_COLS] =
{
     0.00,  0.01,  0.02,  0.03,
    -0.04, -0.05, -0.06, -0.07,
     0.08,  0.09,  0.10,  0.11,
    -0.12, -0.13, -0.14, -0.15,
     0.16,  0.17,  0.18,  0.19
};

arm_matrix_instance_f32 arm_matrix_input_M2_f32 =
{
    .numRows = MATRIX_INPUT_M1_ROWS,
    .numCols = MATRIX_INPUT_M1_COLS,
    .pData   = (float32_t *)matrix_input_M2_data_f32
};

/* 用于矩阵乘法(叉乘)计算. */
float32_t matrix_input_M3_data_f32[MATRIX_INPUT_M1_COLS*MATRIX_INPUT_M3_COLS] =
{
    0.00, 0.01, 0.02, 0.03, 0.04, 0.05,
    0.06, 0.07, 0.08, 0.09, 0.10, 0.11,
    0.12, 0.13, 0.14, 0.15, 0.16, 0.17,
    0.18, 0.19, 0.20, 0.21, 0.22, 0.23
};

arm_matrix_instance_f32 arm_matrix_input_M3_f32 =
{
    .numRows = MATRIX_INPUT_M1_COLS, /* M3的行数等于M1的列数 */
    .numCols = MATRIX_INPUT_M3_COLS,
    .pData   = (float32_t *)matrix_input_M3_data_f32
};

/* 用于矩阵求逆计算, 方阵.
 * 矩阵元素的值将在算例中指定.
 */
float32_t matrix_input_M4_data_f32[MATRIX_INPUT_M4_COLS*MATRIX_INPUT_M4_COLS];

arm_matrix_instance_f32 arm_matrix_input_M4_f32 =
{
    .numRows = MATRIX_INPUT_M4_COLS, /* M4的行数等于M4的列数, 方阵. */
    .numCols = MATRIX_INPUT_M4_COLS,
    .pData   = (float32_t *)matrix_input_M4_data_f32
};

/* 所有矩阵计算输出元素的存放地. */
float32_t matrix_output_M_data_f32[MATRIX_OUTPUT_M_COLS*MATRIX_OUTPUT_M_COLS]; /* 按照可能使用的最大内存预留. */

arm_matrix_instance_f32 arm_matrix_output_M_f32 =
{
    .numRows = 0,
    .numCols = 0,
    .pData   = (float32_t *)matrix_output_M_data_f32
};

float32_t vector_window_weights_data_f32[VECTOR_INPUT_ITEMS];

uint32_t matrix_inv_temp[1024];

/* EOF. */

